package com.design.yjx.proxy.rmi.client;

import com.design.yjx.proxy.rmi.service.MyRemote;

import java.rmi.Naming;

/**
 * @author yuanjianxin
 * @date 2017/8/25 11:36
 *
 * 客服端调用代码
 */
public class ClientMain {
    public static void main(String[] args) {
        try {
            MyRemote service = (MyRemote) Naming.lookup("rmi://127.0.0.1:11233/myRemote");
            System.out.println(service.SayHello());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
